Filter hook 'default_option_{$option}'

in WP Core File wp-includes/option.php at line 194

Description

Filters the default value for an option. The dynamic portion of the hook name, `$option`, refers to the option name.

Occurrences

Filename Line Number
wp-includes/option.php 194
wp-includes/option.php 208
wp-includes/option.php 221
wp-includes/option.php 908
wp-includes/option.php 1101

Parameters

Type Name Description
mixed $default_value The default value to return if the option does not exist in the database.
string $option Option name.
bool $passed_default Was `get_option()` passed a default value?

PHP Doc

/**
					 * Filters the default value for an option.
					 *
					 * The dynamic portion of the hook name, `$option`, refers to the option name.
					 *
					 * @since 3.4.0
					 * @since 4.4.0 The `$option` parameter was added.
					 * @since 4.7.0 The `$passed_default` parameter was added to distinguish between a `false` value and the default parameter value.
					 *
					 * @param mixed  $default_value  The default value to return if the option does not exist
					 *                               in the database.
					 * @param string $option         Option name.
					 * @param bool   $passed_default Was `get_option()` passed a default value?
					 */